﻿using Adnc.Application.Shared.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WYT.Usr.Application.Contracts.Dtos;
using WYT.Usr.Application.Contracts.Dtos.User;

namespace WYT.Usr.Application.Contracts.Services
{
    /// <summary>
    /// 账户服务
    /// </summary>
    public interface IAccountAppService : IAppService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<UserTokenInfoDto>> LoginAsync(UserParaDto input);

        /// <summary>
        /// 刷新token
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<UserTokenInfoDto>> RefreshAccessTokenAsync(UserRefreshTokenDto input);

        /// <summary>
        /// 发送验证码(手机号码登录）
        /// </summary>
        /// <param name="telePhone"></param>
        /// <returns></returns>
        Task<AppSrvResult> SendSms(string telePhone);

        /// <summary>
        /// 手机号码登录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<UserTokenInfoDto>> TelLoginAsync(TelLoginDto input);

        /// <summary>
        /// 获取小程序码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<string>> GetWxaCode(WxaCodeDto input);

        /// <summary>
        /// 获取分享参数
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<string>> GetSharePath(long input);

        /// <summary>
        /// 根据用户ID获取用户token 仅用于开发
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<AppSrvResult<UserTokenInfoDto>> LoginAsync(long userId);
    }
}
